<%--
  Created by IntelliJ IDEA.
  User: HX
  Date: 2021/1/25
  Time: 14:40
  To change this template use File | Settings | File Templates.
--%>

<%--这个案例非常重要--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--一般prefix的值都写c--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <c:if test="${age>=18}">
        <h3>成年了</h3>
    </c:if>
    <c:if test="${age<18}">
        <h3>未成年</h3>
    </c:if>

    <hr>
    <table border="1" width="50%" align="center" cellspacing="0">
        <tr align="center" bgcolor="red">
            <th>编号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>生日</th>
        </tr>
        <c:forEach var="user" items="${List}" varStatus="status">

            <tr align="center" bgcolor="yellow">
                <td>${status.count}</td>
                <td>${user.name}</td>
                <td>${user.age}</td>
                <td>${user.birStr}</td>
            </tr>

        </c:forEach>





    </table>


</body>
</html>
